﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;

namespace AppiSynchro.Library.Helpers
{
    public class RegistryHelper
    {
        public static String GetValue(RegistryKey key, String path, String value)
        {
            RegistryKey hklm = key;
            hklm = hklm.OpenSubKey(path);
            Object obp = hklm.GetValue(value);
            
            return (String)obp;
        }

        public static RegistryKey GetKey(String key)
        {
            if (key == "HKEY_LOCAL_MACHINE")
                return Microsoft.Win32.Registry.LocalMachine;

            throw new NotSupportedException(key + " is not supported");
        }
    }
}
